﻿<UserControl x:Class="Mengsk.ERP.App.Orders.OrderDeliveryImport"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1200" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Button x:Name="btnOpen" Content="打开" Margin="3" VerticalAlignment="Center" Click="btnOpen_Click" Width="60"/>
            <Button x:Name="btnClear" Content="清空" Margin="3" VerticalAlignment="Center" Click="btnClear_Click" Width="60"/>
            <CheckBox Content="在线更新PPCOD" x:Name="chkUpdatePPCod" Margin="20,3,3,3" IsChecked="True" VerticalAlignment="Center"/>
            <Button x:Name="btnImport" Content="导入" Margin="3" VerticalAlignment="Center" Click="btnImport_Click" Width="60"/>
            <TextBlock Name="tbTotalCount" Margin="3" VerticalAlignment="Center"/>
        </StackPanel>

        <DataGrid Grid.Row="1" Name="dgvItems" IsReadOnly="True" AutoGenerateColumns="False" SelectionMode="Extended" SelectionUnit="CellOrRowHeader">
            <DataGrid.RowStyle>
                <Style TargetType="{x:Type DataGridRow}">
                    <Setter Property="Background" Value="{Binding Background}"/>
                </Style>
            </DataGrid.RowStyle>
            <DataGrid.Columns>
                <DataGridTextColumn Header="店铺账号" Binding="{Binding Shop}"/>
                <DataGridTextColumn Header="订单编号" Binding="{Binding Id}"/>
                <DataGridTextColumn Header="下单时间" Binding="{Binding OrderTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                <DataGridTextColumn Header="打印时间" Binding="{Binding PrintTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                <DataGridTextColumn Header="打印模板" Binding="{Binding PrintDeliveryCompany}"/>
                <DataGridTextColumn Header="物流公司" Binding="{Binding DeliveryCompany}"/>
                <DataGridTextColumn Header="物流编号" Binding="{Binding DeliveryNumber}"/>
                <DataGridTextColumn Header="处理状态" Binding="{Binding State}"/>
                <DataGridTextColumn Header="商品信息" Binding="{Binding GoodsInfo}"/>
                <DataGridTextColumn Header="收货地址" Binding="{Binding Address}"/>
            </DataGrid.Columns>


        </DataGrid>
    </Grid>
</UserControl>
